import 'package:hotpot/generated/json/base/json_field.dart';
import 'package:hotpot/generated/json/floor.g.dart';
import 'dart:convert';

@JsonSerializable()
class Floor {

	int? id;
	String? name;
	@JSONField(name: "background_color")
	String? backgroundColor;
	@JSONField(name: "table_ids")
	List<int>? tableIds;
	int? sequence;
	List<FloorTables>? tables;
  
  Floor();

  factory Floor.fromJson(Map<String, dynamic> json) => $FloorFromJson(json);

  Map<String, dynamic> toJson() => $FloorToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class FloorTables {

	int? id;
	String? name;
	double? width;
	double? height;
	@JSONField(name: "position_h")
	double? positionH;
	@JSONField(name: "position_v")
	double? positionV;
	String? shape;
	@JSONField(name: "floor_id")
	List<String>? floorId;
	String? color;
	int? seats;
	bool? active;
  
  FloorTables();

  factory FloorTables.fromJson(Map<String, dynamic> json) => $FloorTablesFromJson(json);

  Map<String, dynamic> toJson() => $FloorTablesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}